home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / c_news / 09 / hgraph2 / mouse.h < prev    next >
C/C++ Source or Header  |  1988-03-26  |  4KB  |  87 lines

  1. #include <dos.h>
  2.  
  3. #define ON      1
  4. #define OFF     0
  5. #define MOVED   1
  6. #define LBPRESS 2
  7. #define LBREL   4
  8. #define RBPRESS 8
  9. #define RBREL   16
  10.  
  11. int     m_init(int *buttons);
  12. void    m_cursor(int on);
  13. int     m_status(int *hpos,int *vpos);
  14. void    m_move(int hpos,int vpos);
  15. void    m_limit(int hmin,int hmax,int vmin,int vmax);
  16. void    m_shape(int seg,int *shape);
  17. void    m_texts(int andmask,int xormask);
  18. void    m_texth(int block);
  19. void    m_mickey(int *hcount, int *vcount);
  20. void    m_gosub(int event,int seg,int offset);
  21. void    m_lpen(int on);
  22. void    m_ratio(int hratio,int vratio);
  23. void    m_auto(int x1,int y1,int x2,int y2);
  24. int     m_info_p(int button,int *presses,int *hpos,int *vpos);
  25. int     m_info_r(int button,int *releases,int *hpos,int *vpos);
  26.  
  27. /*       several handy graphics mouse cursor shapes
  28.             first 16 ints are the AND mask (all bits which will NOT be
  29.                                             changed are set ==1)
  30.             next 16 ints are the XOR mask (all bits which will be
  31.                                            changed to fg color are
  32.                                            set ==1)
  33.             last 2 ints are the horizontal and vertical HOTSPOTS
  34.             respectively, HOTSPOT is the location returned as the
  35.             current mouse position, HOTSPOT is relative to upper
  36.             left corner of mouse cursor
  37.  
  38.             example:
  39.                stndl=  AND mask         XOR mask
  40.       HOT SPOT ------> 0011111111111111  0000000000000000
  41.                        0001111111111111  0100000000000000
  42.                        0000111111111111  0110000000000000
  43.                        0000011111111111  0111000000000000
  44.                        0000001111111111  0111100000000000
  45.                        0000000111111111  0111110000000000
  46.                        0000000011111111  0111111000000000
  47.                        0000000001111111  0111111100000000
  48.                        0000000000111111  0111111110000000
  49.                        0000000000011111  0111111111000000
  50.                        0000000111111111  0111111000000000
  51.                        0001000011111111  0100011000000000
  52.                        0011000011111111  0000011000000000
  53.                        1111100001111111  0000001100000000
  54.                        1111100001111111  0000001100000000
  55.                        1111110000111111  0000000110000000
  56.  
  57.           HOT SPOT =   0,0
  58.  
  59. */
  60.  
  61. int  stndl[34]={0x3FFF,0x1FFF,0x0FFF,0x07FF,0x03FF,0x01FF,0x00FF,0x007F,
  62.                 0x003F,0x001F,0x01FF,0x10FF,0x30FF,0xF87F,0xF87F,0xFC3F,
  63.                 0x0000,0x4000,0x6000,0x7000,0x7800,0x7C00,0x7E00,0x7F00,
  64.                 0x7F80,0x7FC0,0x7C00,0x4600,0x0600,0x0300,0x0300,0x0180,
  65.                 0x0000,0x0000};
  66. int   hand[34]={0xE1FF,0xE1FF,0xE1FF,0xE1FF,0xE1FF,0xE000,0xE000,0xE000,
  67.                 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  68.                 0x1E00,0x1200,0x1200,0x1200,0x1200,0x13FF,0x1249,0x1249,
  69.                 0xF249,0x9001,0x9001,0x9001,0x8001,0x8001,0x8001,0xFFFF,
  70.                 0x0005,0x0000};
  71. int  xmark[34]={0x07E0,0x0180,0x0000,0xC003,0xF00F,0xC003,0x0000,0x0180,
  72.                 0x07E0,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  73.                 0x0000,0x700E,0x1C38,0x0660,0x03C0,0x0660,0x1C38,0x700E,
  74.                 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  75.                 0x0007,0x0004};
  76. int  check[34]={0xFFF0,0xFFE0,0xFFC0,0xFF81,0xFF03,0x0607,0x000F,0x001F,
  77.                 0xC03F,0xF07F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  78.                 0x0000,0x0006,0x000C,0x0018,0x0030,0x0060,0x70C0,0x1D80,
  79.                 0x0700,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  80.                 0x0006,0x0007};
  81. int  glass[34]={0x0000,0x0000,0x0000,0x0000,0x8001,0xC003,0xE007,0xF00F,
  82.                 0xE007,0xC003,0x8001,0x0000,0x0000,0x0000,0x0000,0xFFFF,
  83.                 0x0000,0x7FFE,0x6006,0x300C,0x1818,0x0C30,0x0660,0x03C0,
  84.                 0x0660,0x0C30,0x1998,0x33CC,0x67E6,0x7FFE,0x0000,0x0000,
  85.                 0x0007,0x0007};
  86.  
  87.